/*
* @Author: karry
* @Date:   2020-02-23 13:00:37
* @Last Modified by:   karry
* @Last Modified time: 2020-02-23 13:00:37
*/
import MUtil 	from 'util/db.jsx';

const _db 	= new MUtil();

class Order{
	// 获取商品列表
	getOrderList(listParam){
		let url 	= '',
			data 	= {};
		if (listParam.listType === 'list') {
			url 		 = '/manage/order/list.do';
			data.pageNum = listParam.pageNum;
		}else if (listParam.listType === 'search') {
			url 		 = '/manage/order/search.do';
			data.pageNum = listParam.pageNum;
			data.orderNo = listParam.orderNo;
		}
		return _db.request({
			type: 'post',
			url : url,
			data: data
		});
	}
	// 获取订单详情
	getOrderDetail(orderNumber){
		return _db.request({
			type: 'post',
			url : '/manage/order/detail.do',
			data: {
				orderNo : orderNumber
			}
		});
	}
	// 订单发货
	sendGoods(orderNumber){
		return _db.request({
			type: 'post',
			url : '/manage/order/send_goods.do',
			data: {
				orderNo : orderNumber
			}
		});
	}
}

export default Order;